shouldUpRecreateTask

open fun shouldUpRecreateTask(@NonNull sourceActivity: @NonNull Activity, @NonNull targetIntent: @NonNull Intent): Boolean(source)

Deprecated

Call shouldUpRecreateTask directly.

Returns true if sourceActivity should recreate the task when navigating 'up' by using targetIntent.

If this method returns false the app can trivially call navigateUpTo using the same parameters to correctly perform up navigation. If this method returns true, the app should synthesize a new task stack by using TaskStackBuilder or another similar mechanism to perform up navigation.

Return

true if navigating up should recreate a new task stack, false if the same task should be used for the destination

Parameters

sourceActivity

The current activity from which the user is attempting to navigate up

targetIntent

An intent representing the target destination for up navigation